import { defineStore } from 'pinia'
import { ref } from 'vue'

export const useUserStore = defineStore(
	'user',
	() => {
		const token = ref('')
		const openType = ref('switchTab')
		const redirectUrl = ref('/pages/index/index')
		return { token, openType, redirectUrl }
	},
	{
		persist: {
			paths: ['token', 'openType', 'redirectUrl'],
		},
	}
)
